package com.free.mini.core.server.api;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.free.mini.common.base.ResultData;
import com.free.mini.core.server.config.CoreServerFeignConfiguration;
import com.free.mini.core.server.vo.req.StudyModuleCreateReqVO;
import com.free.mini.core.server.vo.req.StudyModuleQueryReqVO;
import com.free.mini.core.server.vo.req.StudyModuleUpdateReqVO;
import com.free.mini.core.server.vo.resp.StudyModuleQueryRespVO;

/**
 * 学习模块
 * 
 * @author dongsufeng
 * @version 4.0
 * @date 2023/8/1 15:30
 */
@FeignClient(name = "studyModuleApi",url = "${feign.core.server.url:http://101.43.170.244:8083}", configuration = CoreServerFeignConfiguration.class)
public interface StudyModuleApi {

    /**
     * 模块列表
     * 
     * @return
     */
    @PostMapping("study/v1/module/list")
    ResultData<List<StudyModuleQueryRespVO>> list(@RequestBody StudyModuleQueryReqVO reqVO);

    @PostMapping("study/v1/module/detail")
    ResultData<StudyModuleQueryRespVO> detail(@RequestBody StudyModuleQueryReqVO reqVO);
    /**
     * 模块列表
     *
     * @return
     */
    @PostMapping("study/v1/module/page")
    ResultData<Page<StudyModuleQueryRespVO>> page(@RequestBody StudyModuleQueryReqVO reqVO);

    @PostMapping("study/v1/module/create")
    ResultData<Boolean> create(@RequestBody @Validated StudyModuleCreateReqVO reqVO);
    @PostMapping("study/v1/module/update")
    ResultData<Boolean> update(@RequestBody @Validated StudyModuleUpdateReqVO reqVO);
}
